home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / utmisc2 / fiflb382.lha / Makefile.in < prev    next >
Makefile  |  1996-05-13  |  3KB  |  106 lines

  1. # GNU-Makefile for fifo library
  2.  
  3. # If configure doesn't work for you ({} globbed in config.cache), your
  4. # pdksh is outdated, get a version newer than November 95.
  5.  
  6. # You may prefer simply . (current directory)
  7. srcdir =    @srcdir@
  8. VPATH =        @srcdir@
  9.  
  10. prefix =    @prefix@
  11. exec_prefix =    @exec_prefix@
  12.  
  13. bindir =    $(exec_prefix)/bin
  14. # You may prefer libs: and l:
  15. libsdir =    $(exec_prefix)/Sys/libs
  16. ldir =        $(exec_prefix)/Sys/l
  17. # You may prefer $(prefix)/os-include
  18. incdir =    $(prefix)/include
  19. infodir =    $(prefix)/info
  20. fddir =        $(prefix)/fd
  21.  
  22. INSTALL =    @INSTALL@
  23. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  24. INSTALL_DATA =    @INSTALL_DATA@
  25.  
  26. CC =        @CC@
  27. RM =        rm
  28. DEFS =        @DEFS@
  29. LIBS =        @LIBS@
  30. # flags ignored, Fred Fish's configure throws -O2 into CFLAGS
  31. CFLAGS =    @CFLAGS@
  32. LDFLAGS =    @LDFLAGS@
  33.  
  34. INCLUDES =    -I$(srcdir)
  35. # don't let CFLAGS, LDFLAGS get in my way, ignore them
  36. OUR_CFLAGS =    $(DEFS) -O2 -Wall -msmall-code -noixemul $(INCLUDES)
  37. OUR_LDFLAGS =    -Wl,-x
  38.  
  39. # -noixemul (optional) makes independent (2.0) binaries for small systems
  40. #  only RemCLI and testfifo need some libc.a
  41. # -DUSE_PC_REL if your gas generates 68000-compatible code for pc@(label)
  42. # -DUSE_SIGNAL if you use neither DICE nor libnix, e.g. ixemul
  43. # -msmall-code passes -l to as and -shortdata to ld
  44. # -I$(srcdir) so <libraries/fifo.h> is found there
  45. # -Wl,-x to keep only external symbols (no dreaded __gnu_compiled_c)
  46. # -nostartfiles is necessary because htags.s and tag.s contain startup code
  47. # -nostdlib implies -nostartfiles
  48.  
  49. .SUFFIXES:    .S .c
  50. # .S means that assembly file must be preprocessed
  51.  
  52. .S.o:
  53.         $(CC) $(OUR_CFLAGS) -c $<
  54.  
  55. .c.o:
  56.         $(CC) $(OUR_CFLAGS) -c $<
  57.  
  58. all:        fifo-handler fifo.library RemCLI testfifo
  59.  
  60. # with optimization on, needs no link library at all
  61. fifo.library: tag.o lib.o fifo.o
  62.         $(CC) -nostdlib $(OUR_CFLAGS) $(OUR_LDFLAGS) -o $@ $^
  63.  
  64. # still needs -lamiga for CreatePort etc.
  65. fifo-handler: htag.o fifo-handler.o
  66.         $(CC) -nostdlib $(OUR_CFLAGS) $(OUR_LDFLAGS) -o $@ $^ -lamiga
  67.  
  68. fifo-handler-debug: htag.o fifo-handler-debug.o
  69.         $(CC) -v -nostdlib $(OUR_CFLAGS) $(OUR_LDFLAGS) -o $@ $^ -lamiga
  70.  
  71. tag.o: tag.S
  72.  
  73. lib.o: lib.c defs.h
  74.  
  75. fifo.o: fifo.c defs.h
  76.  
  77. htag.o: htag.S
  78.  
  79. fifo-handler.o: fifo-handler.c handler.h
  80.  
  81. fifo-handler-debug.o: fifo-handler.c
  82.         $(CC) -DDEBUG $(OUR_CFLAGS) -o $@ -c $<
  83.  
  84.  
  85. RemCLI: remcli.o
  86.         $(CC) $(OUR_CFLAGS) $(OUR_LDFLAGS) -o $@ $^
  87.  
  88. testfifo: testfifo.o
  89.         $(CC) $(OUR_CFLAGS) $(OUR_LDFLAGS) -o $@ $^
  90.  
  91. install:
  92.         $(INSTALL_PROGRAM) fifo-handler $(ldir)/fifo-handler
  93.         $(INSTALL_PROGRAM) fifo.library $(libsdir)/fifo.library
  94.         $(INSTALL_PROGRAM) RemCLI $(bindir)/RemCLI
  95.         $(INSTALL_DATA) $(srcdir)/clib/fifo_protos.h $(incdir)/clib/fifo_protos.h
  96.         $(INSTALL_DATA) $(srcdir)/inline/fifo.h $(incdir)/inline/fifo.h
  97.         $(INSTALL_DATA) $(srcdir)/libraries/fifo.h $(incdir)/libraries/fifo.h
  98.         $(INSTALL_DATA) $(srcdir)/proto/fifo.h $(incdir)/proto/fifo.h
  99.         $(INSTALL_DATA) $(srcdir)/fd/fifo_lib.fd $(fddir)/fifo_lib.fd
  100.  
  101. clean:
  102.         $(RM) -f *.o *! *~
  103.  
  104. clobber:    clean
  105.         $(RM) -f fifo-handler fifo.library testfifo RemCLI fifo-handler-debug
  106.